<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:replace="template :: header"></div>
<div class="page-header">
    <h1>用户注册 <small></small></h1>
</div>
<form th:action="@{/user/changePassword}" th:object="${user}" th:method="post" method="post" role="form" action="/user/changePassword">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">密码修改</h3>
        </div>
        <div class="panel-body">
            <div class="form-group" th:with="hasError=${#fields.hasErrors('password')}"  th:classappend="${hasError} ? 'has-error'">
                <label class="control-label" for="userName">用户名</label>
                <input type="text" class="form-control" id="userName" th:field="*{userName}"
                       data-container="body" data-toggle="popover" data-trigger="focus" data-placement="left" data-content="3到20位,填写字母和数字">
                <span class="help-block" th:if="${hasError}" th:errors="*{userName}"></span>
            </div>
            <div class="form-group" th:with="hasError=${#fields.hasErrors('password')}"  th:classappend="${hasError} ? 'has-error'">
                <label class="control-label" for="password">密码</label>
                <input type="password" class="form-control" id="password" th:field="*{password}"
                       data-container="body" data-toggle="popover" data-trigger="focus" data-placement="left" data-content="6到20位,字母数字组合">
                <span class="help-block" th:if="${hasError}" th:errors="*{password}"></span>
            </div>
            <div class="form-group" th:with="hasError=${#fields.hasErrors('confirmPassword')}"  th:classappend="${hasError} ? 'has-error'">
                <label class="control-label" for="confirmPassword">密码确认</label>
                <input type="password" class="form-control" id="confirmPassword" th:field="*{confirmPassword}">
                <span class="help-block" th:if="${hasError}" th:errors="*{confirmPassword}"></span>
            </div>
        </div>
        <div class="panel-footer">
            <div class=" text-right">
                <button type="submit" class="btn btn-primary">注册</button>
            </div>
        </div>
    </div>
</form>
</body>
</html>
